//
//  WJYPhotoCollectionViewCell.m
//  WWLNetease
//
//  Created by dllo on 15/12/26.
//  Copyright © 2015年 Echo.Jobs. All rights reserved.
//

#import "WJYPhotoCollectionViewCell.h"

@interface WJYPhotoCollectionViewCell ()

@property (nonatomic, retain) UIImageView *imageView;
@property (nonatomic, retain) NSString *imgurl;
@property (nonatomic, retain) NSString *note;

@end

@implementation WJYPhotoCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.imageView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.imageView];
        self.imageView.contentMode = UIViewContentModeScaleAspectFit;
    }
    return self;
}

-(void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
    
    self.imageView.frame = CGRectMake(0, 100, SCREEN_FRAME.size.width, SCREEN_FRAME.size.height / 2);
    
}

-(void)setDic:(NSDictionary *)dic {
    
    if (_dic != dic) {
        _dic = dic;
    }
    
    self.imgurl = [dic objectForKey:@"imgurl"];
    
    [self.imageView sd_setImageWithURL:[NSURL URLWithString:self.imgurl] placeholderImage:[UIImage imageNamed:@"audionews_play_bg"]];
}


@end
